// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

using Elastic.Transport;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

#nullable restore
namespace Elastic.Clients.Elasticsearch.Snapshot
{
	public sealed class GetSnapshotRequestParameters : RequestParameters<GetSnapshotRequestParameters>
	{
		[JsonIgnore]
		public bool? IgnoreUnavailable { get => Q<bool?>("ignore_unavailable"); set => Q("ignore_unavailable", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("master_timeout"); set => Q("master_timeout", value); }

		[JsonIgnore]
		public bool? Verbose { get => Q<bool?>("verbose"); set => Q("verbose", value); }

		[JsonIgnore]
		public bool? IndexDetails { get => Q<bool?>("index_details"); set => Q("index_details", value); }

		[JsonIgnore]
		public bool? IndexNames { get => Q<bool?>("index_names"); set => Q("index_names", value); }

		[JsonIgnore]
		public bool? IncludeRepository { get => Q<bool?>("include_repository"); set => Q("include_repository", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Snapshot.SnapshotSort? Sort { get => Q<Elastic.Clients.Elasticsearch.Snapshot.SnapshotSort?>("sort"); set => Q("sort", value); }

		[JsonIgnore]
		public int? Size { get => Q<int?>("size"); set => Q("size", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.SortOrder? Order { get => Q<Elastic.Clients.Elasticsearch.SortOrder?>("order"); set => Q("order", value); }

		[JsonIgnore]
		public string? After { get => Q<string?>("after"); set => Q("after", value); }

		[JsonIgnore]
		public int? Offset { get => Q<int?>("offset"); set => Q("offset", value); }

		[JsonIgnore]
		public string? FromSortValue { get => Q<string?>("from_sort_value"); set => Q("from_sort_value", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Name? SlmPolicyFilter { get => Q<Elastic.Clients.Elasticsearch.Name?>("slm_policy_filter"); set => Q("slm_policy_filter", value); }
	}

	public sealed partial class GetSnapshotRequest : PlainRequestBase<GetSnapshotRequestParameters>
	{
		public GetSnapshotRequest(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Names snapshot) : base(r => r.Required("repository", repository).Required("snapshot", snapshot))
		{
		}

		internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotGet;
		protected override HttpMethod HttpMethod => HttpMethod.GET;
		protected override bool SupportsBody => false;
		[JsonIgnore]
		public bool? IgnoreUnavailable { get => Q<bool?>("ignore_unavailable"); set => Q("ignore_unavailable", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Duration? MasterTimeout { get => Q<Elastic.Clients.Elasticsearch.Duration?>("master_timeout"); set => Q("master_timeout", value); }

		[JsonIgnore]
		public bool? Verbose { get => Q<bool?>("verbose"); set => Q("verbose", value); }

		[JsonIgnore]
		public bool? IndexDetails { get => Q<bool?>("index_details"); set => Q("index_details", value); }

		[JsonIgnore]
		public bool? IndexNames { get => Q<bool?>("index_names"); set => Q("index_names", value); }

		[JsonIgnore]
		public bool? IncludeRepository { get => Q<bool?>("include_repository"); set => Q("include_repository", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Snapshot.SnapshotSort? Sort { get => Q<Elastic.Clients.Elasticsearch.Snapshot.SnapshotSort?>("sort"); set => Q("sort", value); }

		[JsonIgnore]
		public int? Size { get => Q<int?>("size"); set => Q("size", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.SortOrder? Order { get => Q<Elastic.Clients.Elasticsearch.SortOrder?>("order"); set => Q("order", value); }

		[JsonIgnore]
		public string? After { get => Q<string?>("after"); set => Q("after", value); }

		[JsonIgnore]
		public int? Offset { get => Q<int?>("offset"); set => Q("offset", value); }

		[JsonIgnore]
		public string? FromSortValue { get => Q<string?>("from_sort_value"); set => Q("from_sort_value", value); }

		[JsonIgnore]
		public Elastic.Clients.Elasticsearch.Name? SlmPolicyFilter { get => Q<Elastic.Clients.Elasticsearch.Name?>("slm_policy_filter"); set => Q("slm_policy_filter", value); }
	}

	public sealed partial class GetSnapshotRequestDescriptor : RequestDescriptorBase<GetSnapshotRequestDescriptor, GetSnapshotRequestParameters>
	{
		internal GetSnapshotRequestDescriptor(Action<GetSnapshotRequestDescriptor> configure) => configure.Invoke(this);
		public GetSnapshotRequestDescriptor(Elastic.Clients.Elasticsearch.Name repository, Elastic.Clients.Elasticsearch.Names snapshot) : base(r => r.Required("repository", repository).Required("snapshot", snapshot))
		{
		}

		internal GetSnapshotRequestDescriptor()
		{
		}

		internal override ApiUrls ApiUrls => ApiUrlsLookups.SnapshotGet;
		protected override HttpMethod HttpMethod => HttpMethod.GET;
		protected override bool SupportsBody => false;
		public GetSnapshotRequestDescriptor After(string? after) => Qs("after", after);
		public GetSnapshotRequestDescriptor FromSortValue(string? fromSortValue) => Qs("from_sort_value", fromSortValue);
		public GetSnapshotRequestDescriptor IgnoreUnavailable(bool? ignoreUnavailable = true) => Qs("ignore_unavailable", ignoreUnavailable);
		public GetSnapshotRequestDescriptor IncludeRepository(bool? includeRepository = true) => Qs("include_repository", includeRepository);
		public GetSnapshotRequestDescriptor IndexDetails(bool? indexDetails = true) => Qs("index_details", indexDetails);
		public GetSnapshotRequestDescriptor IndexNames(bool? indexNames = true) => Qs("index_names", indexNames);
		public GetSnapshotRequestDescriptor MasterTimeout(Elastic.Clients.Elasticsearch.Duration? masterTimeout) => Qs("master_timeout", masterTimeout);
		public GetSnapshotRequestDescriptor Offset(int? offset) => Qs("offset", offset);
		public GetSnapshotRequestDescriptor Order(Elastic.Clients.Elasticsearch.SortOrder? order) => Qs("order", order);
		public GetSnapshotRequestDescriptor Size(int? size) => Qs("size", size);
		public GetSnapshotRequestDescriptor SlmPolicyFilter(Elastic.Clients.Elasticsearch.Name? slmPolicyFilter) => Qs("slm_policy_filter", slmPolicyFilter);
		public GetSnapshotRequestDescriptor Sort(Elastic.Clients.Elasticsearch.Snapshot.SnapshotSort? sort) => Qs("sort", sort);
		public GetSnapshotRequestDescriptor Verbose(bool? verbose = true) => Qs("verbose", verbose);
		public GetSnapshotRequestDescriptor Repository(Elastic.Clients.Elasticsearch.Name repository)
		{
			RouteValues.Required("repository", repository);
			return Self;
		}

		public GetSnapshotRequestDescriptor Snapshot(Elastic.Clients.Elasticsearch.Names snapshot)
		{
			RouteValues.Required("snapshot", snapshot);
			return Self;
		}

		protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
		{
		}
	}
}